| Plant | Flowers | Date | lon | lat | ele | Month | Year | julian |
|---|---|---|---|---|---|---|---|---|
| Glossoloma oblongicalyx | 4 | 2015-10-19 | -78.59093 | 0.130838 | 2270 | October | 2015 | 292 |
| Gasteranthus quitensis | 2 | 2016-10-17 | -78.59770 | 0.120070 | 1940 | October | 2016 | 291 |
| Kohleria affinis | 1 | 2016-12-13 | -78.59534 | 0.126746 | 2110 | December | 2016 | 348 |
| Columnea ciliata | 3 | 2014-02-27 | -78.59934 | 0.116682 | 1960 | February | 2014 | 58 |
| Columnea medicinalis | 1 | 2014-04-23 | -78.59372 | 0.128700 | 2130 | April | 2014 | 113 |
| Drymonia teuscheri | 3 | 2016-07-28 | -78.59245 | 0.129393 | 2200 | July | 2016 | 210 |
| Plant | Flowers | Date | lon | lat | ele | Month | Year | julian |
|---|---|---|---|---|---|---|---|---|
| Glossoloma oblongicalyx | 4 | 2015-10-19 | -78.59093 | 0.130838 | 2270 | October | 2015 | 292 |
| Gasteranthus quitensis | 2 | 2016-10-17 | -78.59770 | 0.120070 | 1940 | October | 2016 | 291 |
| Kohleria affinis | 1 | 2016-12-13 | -78.59534 | 0.126746 | 2110 | December | 2016 | 348 |
| Columnea ciliata | 3 | 2014-02-27 | -78.59934 | 0.116682 | 1960 | February | 2014 | 58 |
| Columnea medicinalis | 1 | 2014-04-23 | -78.59372 | 0.128700 | 2130 | April | 2014 | 113 |
| Drymonia teuscheri | 3 | 2016-07-28 | -78.59245 | 0.129393 | 2200 | July | 2016 | 210 |
Peak date
## sink("model/julian.jags")
## cat("
## model {
##
## for (x in 1:Nobs){
##
## #observation
## log(phi[x])<-alpha[Plant[x]] + beta[Plant[x]] * julian[x] + beta2[Plant[x]] * julian[x]^2
##
## Yobs[x] ~ dpois(phi[x])
##
## }
##
##
## #Assess Model Fit
## #Priors
##
## #Species level priors
##
## for (j in 1:Plants){
##
## #Intercept
## #poisson regression prior
## beta[j] ~ dnorm(0,0.0001)
## beta2[j] ~ dnorm(0,0.0001)
## alpha[j] ~ dnorm(0,0.0001)
## }
##
## }
## ",fill=TRUE)
##
## sink()
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 4267
## Unobserved stochastic nodes: 51
## Total graph size: 25691
##
## Initializing model
## sink("model/julian_decay.jags")
## cat("
## model {
##
## #observation - species specific intercept and phylogenetic covariance in julian day
##
## for (x in 1:Nobs){
##
## log(phi[x])<- alpha[Plant[x]] + beta[Plant[x]] * julian[x] + beta2[Plant[x]] * julian[x]^2
##
## Yobs[x] ~ dpois(phi[x])
##
## }
##
## #species-specific responses to julian day. Polynomial model.
## #autocorrelation in error
## beta[1:Plants] ~ dmnorm(beta.mu[],tauC[,])
## beta2[1:Plants] ~ dmnorm(beta2.mu[],tauC2[,])
##
## ##covariance among similiar species
## for(i in 1:Plants){
## for(j in 1:Plants){
## C[i,j] = exp(-lambda * D[i,j])
## }
## }
##
## ## Since the response to julian is X^2 polynomial, need covariance effects on both terms.
## ## These terms share everything except for the scaling factor sigma. The decay of effect is the same.
## ## covert variance to precision for each parameter
##
## iC=inverse(C[,])
##
## tauC=iC
## tauC2=iC
##
## ## **************************
## ## Priors
## ## **************************
##
## #Species level priors
##
## for (j in 1:Plants){
##
## #Intercept
## beta.mu[j] ~ dnorm(0,0.0001)
## beta2.mu[j] ~ dnorm(0,0.0001)
## alpha[j] ~ dnorm(0,0.0001)
## }
##
## #Strength of covariance decay
## lambda ~ dunif(0,5)
##
##
## }
## ",fill=TRUE)
##
## sink()
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 3514
## Unobserved stochastic nodes: 45
## Total graph size: 21452
##
## Initializing model
## sink("model/julian_decay_repulse.jags")
## cat("
## model {
##
## #observation - species specific intercept and phylogenetic covariance in julian day
##
## for (x in 1:Nobs){
##
## log(phi[x])<- alpha[Plant[x]] + beta[Plant[x]] * julian[x] + beta2[Plant[x]] * julian[x]^2
##
## Yobs[x] ~ dpois(phi[x])
##
## }
##
## #species-specific responses to julian day. Polynomial model.
## #autocorrelation in error
## beta[1:Plants] ~ dmnorm(beta.mu[],tauC[,])
## beta2[1:Plants] ~ dmnorm(beta2.mu[],tauC2[,])
##
## ##covariance among similiar species
## for(i in 1:Plants){
## for(j in 1:Plants){
## C[i,j] = exp(-lambda * D[i,j])
## }
## }
##
## #Inverse matrix correlation for repulsion - see Ives and Helmus 2011
## #For clarity sake this is performed, even though it is undone by converting to precision
## iC=inverse(C[,])
##
## ## Since the response to julian is X^2 polynomial, need covariance effects on both terms.
## ## These terms share everything except for the scaling factor sigma. The decay of effect is the same.
## ## covert variance to precision for each parameter
##
## tauC[1:Plants,1:Plants]=iC
## tauC2[1:Plants,1:Plants]=iC
##
## ## **************************
## ## Priors
## ## **************************
##
## #Species level priors
##
## for (j in 1:Plants){
##
## #Intercept
## beta.mu[j] ~ dnorm(0,0.0001)
## beta2.mu[j] ~ dnorm(0,0.0001)
## alpha[j] ~ dnorm(0,0.0001)
## }
##
## #Strength of covariance decay
## lambda ~ dunif(0,5)
##
##
## }
## ",fill=TRUE)
##
## sink()
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 3514
## Unobserved stochastic nodes: 45
## Total graph size: 21452
##
## Initializing model